﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="KMrpt29.aspx.cs" Inherits="KMrpt29" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>品类尺码销存占比</title>
    <script src="js/extTools.js" type="text/javascript"></script>
    <style>
        .x-grid-row-over .x-grid-cell-inner
        {
            font-weight: bold;
        }
        .x-column-header-inner
        {
            height: 28px;
            background: #E7EBEF url(./images/header.png) repeat-x 0 0;
        }
    </style>
    <script>
        var areachange = function (obj) {
            //alert(obj.value);
            CompanyX.binStock(obj.value);
        }
        var saveData = function () {
            App.Hidden1.setValue(Ext.encode(App.GridPanel1.getRowsValues({ selectedOnly: false, currentPageOnly: true })));
        };
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <ext:ResourceManager ID="ResourceManager1" runat="server" Theme="Neptune" />
        <ext:Viewport ID="Viewport1" runat="server" Layout="FitLayout">
            <Items>
                <ext:Hidden ID="FormatType" runat="server" />
                <ext:Hidden ID="Hidden1" runat="server" />
                <ext:GridPanel ID="GridPanel1" runat="server" TitleAlign="Center">
                    <TopBar>
                        <ext:Toolbar ID="Toolbar1" runat="server" Layout="Container">
                            <Items>
                                <ext:Toolbar ID="Toolbar3" runat="server" Layout="ColumnLayout">
                                    <Items>
                                        <ext:DateField runat="server" ID="txtbdate" FieldLabel="日期" />
                                        <ext:Label ID="Label1" runat="server" Text="-">
                                        </ext:Label>
                                        <ext:DateField runat="server" ID="txtedate" />
                                        <ext:Button ID="Button1" runat="server" Text="查询" OnDirectClick="BtnQureyUser" UI="Info"
                                            Icon="Find">
                                            <DirectEvents>
                                                <Click Timeout="90000">
                                                    <EventMask ShowMask="true" Msg="加载中...">
                                                    </EventMask>
                                                </Click>
                                            </DirectEvents>
                                        </ext:Button>
                                        <ext:Component ID="Component2" runat="server" Width="1500" Padding="5">
                                        </ext:Component>
                                        <ext:ComboBox runat="server" ID="arealist" FieldLabel="省份" DisplayField="AreaName"
                                            ValueField="AreaName" QueryMode="Local" TypeAhead="true">
                                            <Store>
                                                <ext:Store runat="server" ID="Store2">
                                                    <Model>
                                                        <ext:Model ID="Model3" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="AreaName" />
                                                                <ext:ModelField Name="AreaName" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:ComboBox>
                                        <ext:MultiCombo runat="server" ID="txtseries" FieldLabel="系列" DisplayField="seriesname"
                                            ValueField="seriesname">
                                            <Store>
                                                <ext:Store runat="server" ID="st_stock">
                                                    <Model>
                                                        <ext:Model ID="Model6" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="seriesname" />
                                                                <ext:ModelField Name="seriesname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:TextField runat="server" ID="txtshortname" FieldLabel="货品简称" />
                                        <ext:Component ID="Component1" runat="server" Width="1500" Padding="5">
                                        </ext:Component>
                                        <ext:MultiCombo runat="server" ID="txtseason" FieldLabel="季节" DisplayField="seasonname"
                                            ValueField="seasonname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store4">
                                                    <Model>
                                                        <ext:Model ID="Model5" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="seasonname" />
                                                                <ext:ModelField Name="seasonname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtyear" FieldLabel="年份" DisplayField="yearno"
                                            ValueField="yearno">
                                            <Store>
                                                <ext:Store runat="server" ID="Store3">
                                                    <Model>
                                                        <ext:Model ID="Model8" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="yearno" />
                                                                <ext:ModelField Name="yearno" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                        <ext:MultiCombo runat="server" ID="txtmatkind" FieldLabel="类别" DisplayField="kindname"
                                            ValueField="kindname">
                                            <Store>
                                                <ext:Store runat="server" ID="Store5">
                                                    <Model>
                                                        <ext:Model ID="Model7" runat="server">
                                                            <Fields>
                                                                <ext:ModelField Name="kindname" />
                                                                <ext:ModelField Name="kindname" />
                                                            </Fields>
                                                        </ext:Model>
                                                    </Model>
                                                </ext:Store>
                                            </Store>
                                            <Items>
                                                <ext:ListItem>
                                                </ext:ListItem>
                                            </Items>
                                        </ext:MultiCombo>
                                    </Items>
                                </ext:Toolbar>
                            </Items>
                        </ext:Toolbar>
                    </TopBar>
                    <Store>
                        <ext:Store ID="Store1" runat="server" PageSize="3000" OnReadData="RefreshDataSet"
                            OnSubmitData="Store1_Submit">
                            <Model>
                                <ext:Model ID="Model2" runat="server">
                                    <Fields>
                                        <ext:ModelField Name="分类" ServerMapping="typename" Type="String" />
                                        <ext:ModelField Name="货品简称" ServerMapping="matshortname" Type="String" />
                                        <ext:ModelField Name="值" ServerMapping="getvalue" Type="String" />
                                        <ext:ModelField Name="k_28" ServerMapping="k_28" Type="String" />
                                        <ext:ModelField Name="k_29" ServerMapping="po29" Type="String" />
                                        <ext:ModelField Name="k_30" ServerMapping="k_30" Type="String" />
                                        <ext:ModelField Name="k_31" ServerMapping="k_31" Type="String" />
                                        <ext:ModelField Name="k_32" ServerMapping="k_32" Type="String" />
                                        <ext:ModelField Name="k_33" ServerMapping="k_33" Type="String" />
                                        <ext:ModelField Name="k_34" ServerMapping="k_34" Type="String" />
                                        <ext:ModelField Name="k_36" ServerMapping="k_36" Type="String" />
                                        <ext:ModelField Name="k_38" ServerMapping="k_38" Type="String" />
                                        <ext:ModelField Name="l" ServerMapping="l" Type="String" />
                                        <ext:ModelField Name="m" ServerMapping="m" Type="String" />
                                        <ext:ModelField Name="xl" ServerMapping="xl" Type="String" />
                                        <ext:ModelField Name="xxl" ServerMapping="xxl" Type="String" />
                                        <ext:ModelField Name="3xl" ServerMapping="3xl" Type="String" />
                                        <ext:ModelField Name="x_39" ServerMapping="x_39" Type="String" />
                                        <ext:ModelField Name="x_40" ServerMapping="x_40" Type="String" />
                                        <ext:ModelField Name="x_41" ServerMapping="x_39" Type="String" />
                                        <ext:ModelField Name="x_42" ServerMapping="x_41" Type="String" />
                                        <ext:ModelField Name="x_43" ServerMapping="x_43" Type="String" />
                                        <ext:ModelField Name="total" ServerMapping="total" Type="String" />
                                    </Fields>
                                </ext:Model>
                            </Model>
                        </ext:Store>
                    </Store>
                    <ColumnModel>
                        <Columns>
                            <ext:Column ID="Column1" runat="server" Text="分类" DataIndex="分类" />
                            <ext:Column ID="Column2" runat="server" Text="货品简称" DataIndex="货品简称" />
                            <ext:Column ID="Column3" runat="server" Text="值" DataIndex="值" />
                            <ext:Column ID="Column4" runat="server" Text="下装尺码">
                                <Columns>
                                    <ext:Column ID="Column5" runat="server" Text="28" DataIndex="k_28" Width="80" />
                                    <ext:Column ID="Column6" runat="server" Text="29" DataIndex="k_29" Width="80" />
                                    <ext:Column ID="Column7" runat="server" Text="30" DataIndex="k_30" Width="80" />
                                    <ext:Column ID="Column8" runat="server" Text="31" DataIndex="k_31" Width="80" />
                                    <ext:Column ID="Column9" runat="server" Text="32" DataIndex="k_32" Width="80" />
                                    <ext:Column ID="Column10" runat="server" Text="33" DataIndex="k_33" Width="80" />
                                    <ext:Column ID="Column11" runat="server" Text="34" DataIndex="k_34" Width="80" />
                                    <ext:Column ID="Column12" runat="server" Text="36" DataIndex="k_36" Width="80" />
                                    <ext:Column ID="Column13" runat="server" Text="38" DataIndex="k_38" Width="80" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column14" runat="server" Text="上装尺码">
                                <Columns>
                                    <ext:Column ID="Column15" runat="server" Text="l" DataIndex="l" Width="80" />
                                    <ext:Column ID="Column16" runat="server" Text="m" DataIndex="m" Width="80" />
                                    <ext:Column ID="Column17" runat="server" Text="xl" DataIndex="xl" Width="80" />
                                    <ext:Column ID="Column18" runat="server" Text="xxl" DataIndex="xxl" Width="80" />
                                    <ext:Column ID="Column19" runat="server" Text="3xl" DataIndex="3xl" Width="80" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column20" runat="server" Text="鞋尺码">
                                <Columns>
                                    <ext:Column ID="Column21" runat="server" Text="39" DataIndex="x_39" Width="80" />
                                    <ext:Column ID="Column22" runat="server" Text="40" DataIndex="x_40" Width="80" />
                                    <ext:Column ID="Column23" runat="server" Text="41" DataIndex="x_41" Width="80" />
                                    <ext:Column ID="Column24" runat="server" Text="42" DataIndex="x_42" Width="80" />
                                    <ext:Column ID="Column25" runat="server" Text="43" DataIndex="x_43" Width="80" />
                                </Columns>
                            </ext:Column>
                            <ext:Column ID="Column26" runat="server" Text="总计" DataIndex="total" />
                        </Columns>
                    </ColumnModel>
                    <Features>
                        <ext:Summary ID="Summary1" runat="server">
                        </ext:Summary>
                    </Features>
                    <SelectionModel>
                        <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                    </SelectionModel>
                    <BottomBar>
                        <ext:PagingToolbar ID="PagingToolbar1" runat="server">
                            <Items>
                                <ext:Label ID="Label2" runat="server" Text="每页显示:" />
                                <ext:ToolbarSpacer ID="ToolbarSpacer1" runat="server" Width="10" />
                                <ext:ComboBox ID="ComboBox1" runat="server" Width="80">
                                    <Items>
                                        <ext:ListItem Text="1000" />
                                        <ext:ListItem Text="2500" />
                                        <ext:ListItem Text="3000" />
                                        <ext:ListItem Text="3500" />
                                    </Items>
                                    <SelectedItems>
                                        <ext:ListItem Value="3000" />
                                    </SelectedItems>
                                    <Listeners>
                                        <Select Handler="#{GridPanel1}.store.pageSize = parseInt(this.getValue(), 10); #{GridPanel1}.store.reload();" />
                                    </Listeners>
                                </ext:ComboBox>
                                <ext:Button ID="Button2" runat="server" Text="导出Excel" Icon="PageExcel" Visible="false">
                                    <Listeners>
                                        <Click Handler="exportData('xls');" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Button ID="Button3" runat="server" Text="导出(当前页)" AutoPostBack="true" OnClick="ToExcel"
                                    Icon="PageExcel">
                                    <Listeners>
                                        <Click Fn="saveData" />
                                    </Listeners>
                                </ext:Button>
                                <ext:Label ID="Label3" runat="server" StyleSpec="color:red;" Text="提示：请使用分批导出功能！">
                                </ext:Label>
                            </Items>
                            <Plugins>
                                <ext:ProgressBarPager ID="ProgressBarPager1" runat="server" />
                            </Plugins>
                        </ext:PagingToolbar>
                    </BottomBar>
                    <Listeners>
                        <AfterLayout Handler="#{ToolbarDroppable1}.addDDGroup(this.child('headercontainer').reorderer.dragZone.ddGroup); doSort();"
                            Single="true" />
                    </Listeners>
                </ext:GridPanel>
            </Items>
        </ext:Viewport>
    </div>
    </form>
</body>
</html>
